//
//  BPProductTool.m
//  BeautyPicture
//
//  Created by 沈振邦 on 15/11/4.
//  Copyright © 2015年 szb. All rights reserved.
//

#import "BPProductTool.h"

@implementation BPProductTool

+ (void)homeDatasuccess:(void (^)(id result))success failure:(void (^)(NSError *error))failure
{
    [self getWithUrl:[NSString stringWithFormat:@"%@appapi/getcategory",BPhttp] param:nil resultClass:[HomeModel class] success:success failure:failure];
}

+ (void)productsDataWithClassID:(NSString *)ClassID success:(void (^)(id result))success failure:(void (^)(NSError *error))failure
{
    [self getWithUrl:[NSString stringWithFormat:@"%@appapi/getproductlist/cate_id/%@",BPhttp,ClassID] param:nil resultClass:[BPProducts class] success:success failure:failure];

}

+ (void)prodectDetailDataWithProductID:(NSString *)productID success:(void (^)(BPProductDetail *result))success failure:(void (^)(NSError *error))failure
{
    [self getWithUrl:[NSString stringWithFormat:@"%@appapi/getproductdetail/productid/%@",BPhttp,productID] param:nil resultClass:[BPProductDetail class] success:success failure:failure];
}
@end
